from __future__ import absolute_import
from celery import Celery
from datetime import timedelta



app=Celery('proj',
    broker='redis://localhost',
    backend='redis://localhost',
    include=['proj.tasks']
    )


app.conf.update(
    CELERY_TASK_RESULT_EXPIRES=3600,
    CELERYBEAT_SCHEDULE = {
        'add-every-30-seconds': {
            'task': 'proj.tasks.add',
            'schedule': timedelta(seconds=10),
            'args': (2, 1)
            },
        'get-time': {
            'task':'proj.tasks.st',
            'schedule':timedelta(seconds=5)
            }
        }
    )

if __name__=="__main__":
    app.start()
